<?php
require_once('mysql.php');

$list_id = $_GET['todolist_id'];
$user_id = $_GET['user_id'];
$text = $_GET['text'];
$priority = $_GET['priority'];

$text = addslashes($text);

$query = "insert into todo_entry (list_id, step_no, text, owner_id) values ($list_id, $priority, '$text', $user_id)";
mysql_query($query) or die(mysql_error());

echo mysql_insert_id();
?>
